#PROXY=socks5://192.168.2.3:1081

sudo mv /etc/systemd/system/docker.service.d /tmp/
sudo mkdir -p /etc/systemd/system/docker.service.d

sudo tee /etc/systemd/system/docker.service.d/socks5-proxy.conf <<-'EOF'
[Service]
Environment="ALL_PROXY=socks5://192.168.2.3:1081"
EOF

# sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf <<-'EOF'
# [Service]
# Environment="HTTP_PROXY=socks5://192.168.2.3:1081"
# EOF
# 
# sudo tee /etc/systemd/system/docker.service.d/https-proxy.conf <<-'EOF'
# [Service]
# Environment="HTTPS_PROXY=socks5://192.168.2.3:1081"
# EOF

# Flush changes:
sudo systemctl daemon-reload

# Restart Docker:
sudo systemctl restart docker

# Verify that the configuration has been loaded:
systemctl show --property=Environment docker
#Environment=HTTP_PROXY=http://proxy.example.com:80/


